package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.TCj;
import com.bwie.pojo.TJp;
import com.bwie.service.TJpService;
import com.bwie.mapper.TJpMapper;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 28463
* @description 针对表【t_jp】的数据库操作Service实现
* @createDate 2025-07-30 08:51:11
*/
@Service
public class TJpServiceImpl extends ServiceImpl<TJpMapper, TJp>
    implements TJpService{
    @Autowired
    TJpMapper tJpMapper;

    @Override
    public R deletejpList(Integer id) {
        tJpMapper.deleteById(id);
        return R.OK();
    }

    @Override
    public R updatejpList(TJp tJp) {
        tJpMapper.updateById(tJp);
        return R.OK();
    }


    @Override
    public R addjpList(TJp tJp) {
        tJpMapper.insert(tJp);
        return R.OK();
    }

    @Override
    public R getCjList(PageInfoVo pageInfoVo) {
        return null;
    }


    @Override
    public R getjpList(PageInfoVo pageInfoVo) {
        Page<TJp> jpPage = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        Page<TJp> tJpPage = tJpMapper.selectPage(jpPage, null);
        return R.OK(tJpPage);
    }
}




